{extend name="main/index" /}

{block name="main"}
<div class="main-content">
    <div class="breadcrumbs" id="breadcrumbs">
    <script type="text/javascript">
    try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
    </script>

    <ul class="breadcrumb">
    <li class="active">分配角色</li>
    </ul><!-- .breadcrumb -->
    </div>

    <div class="page-content">
      <h3 class="header smaller lighter blue">分配角色</h3>
    <div class="row">
    <div class="col-xs-12">
        <hr>
       给 <b>{$user['name']}</b> 分配
       <hr>
       <form action="{:url('admin/user/saverole')}" method='post'>
       <div style="margin-bottom: 20px;">
       <div id="ck">
       {volist name="list" id="v"}
           <input type="checkbox" name="role[]" value="{$v['id']}"
           <?php if (in_array($v['id'], $role) == true): ?>checked<?php endif; ?>>{$v['name']} 
           &nbsp;
           &nbsp;
           &nbsp;
           &nbsp;
           <?php if ($i%4 == 0): ?>
                 <br><hr>
           <?php endif; ?>
       {/volist}
       <hr>
       <input type="checkbox" onclick="ck(1)">全选========
       <input type="checkbox" onclick="ck(2)">全取消========
       <input type="checkbox" onclick="ck(3)">反选　
       <br><br>
       </div>
       </div>
       
       <input type="hidden" name="uid" value="{$user['id']}">
       <input type="submit" value="保存" class="btn btn-primary">
       </form>
    </div><!-- /.col -->
    </div><!-- /.row -->
    </div>
</div>
{/block}


{block name="myjs"}
{js href="/static/admin/assets/js/chosse.js"}

{/block}


